1. Field of the Invention
The present invention relates generally to a computerized database system and method, and more specifically, to a distributed computerized database system and method. As used herein, a database xe2x80x9cdata recordxe2x80x9d comprises objects and other data items in a distributed computer database that may be accessed and/or modified by a database management or client process. Also as used herein, the xe2x80x9cmodificationxe2x80x9d of such a data record may comprise the creation of the data record.
2. Brief Description of Related Prior Art
Data communication in a computer network involves data exchange between two or more entities interconnected by communication links. These entities are typically software program processes executing on computer nodes, such as endstations and intermediate stations. Examples of an intermediate station may be a router or switch which interconnects the communication links and subnetworks to enable transmission of data between the endstations. A local area network (LAN) is an example of a subnetwork that provides relatively short distance communication among the interconnected stations, whereas a wide area network enables long distance communication over links provided by public or private telecommunications facilities.
Communication software executing on the endstations correlate and manage data communication with other endstations. The stations typically communicate by exchanging discrete packets or frames of data according to predefined protocols. In this context, a protocol consists of a set of rules defining how the stations interact with each other. In addition, network routing software executing on the routers allow expansion of communication to other endstations. Collectively, these hardware and software components comprise a communications network and their interconnections are defined by an underlying architecture.
Modern communications network architectures are typically organized as a series of hardware and software levels or xe2x80x9clayersxe2x80x9d within each station. These layers interact to format data for transfer between, e.g., a source station and a destination station communicating over the network. Predetermined services are performed on the data as it passes through each layer and the layers communicate with each other by means of the predefined protocols. The lower layers of these architectures are generally standardized and are typically implemented in the form of software running on the stations attached to the network. In one example of such a communications architecture there are five layers which are termed, in ascending interfacing order, physical interface, data link, network, transport and application layers. These layers are arranged to form a protocol stack in each communicating station of the network. FIG. 1 illustrates a schematic block diagram of prior art protocol stacks 125 and 175 used to transmit data between a source station 110 and a destination station 150, respectively, of a network 100. As can be seen, the stacks 125 and 175 are physically connected through a communications medium 180 at the interface layers 120 and 160. For ease of description, the protocol stack 125 will be described.
In general, the lower layers of the communications stack provide inter networking services and the upper layers, which are the users of these services, collectively provide common network application services. The application layer 112 provides services suitable for the different types of applications using the network, while the lower interface layer 120 accepts industry standards defining a flexible network architecture oriented to the implementation of LANs.
Specifically, the interface layer 120 comprises the physical interface layer 126, which is concerned with the actual transmission of signals across the physical communications medium and defines the types of cabling, plugs and connectors used in connection with the channel or medium. The data link layer (i.e., xe2x80x9clayer 2xe2x80x9d) 121 is responsible for transmission of data from one station to another and may be further divided into two sublayers: Logical Link Control (LLC 122) and Medium Access Control (MAC 124).
The MAC sublayer 124 is primarily concerned with controlling access to the transmission medium in an orderly manner and, to that end, defines procedures by which the stations must abide in order to share the medium. In order for multiple stations to share the same medium and still uniquely identify each other, the MAC sublayer defines a hardware or data link address called a MAC address. This MAC address is unique for each station interfacing to a LAN. The LLC sublayer 122 manages communications between devices over a single link of the network.
The network layer 116 (i.e., xe2x80x9clayer 3xe2x80x9d) provides network routing and that relies on transport protocols for end-to-end reliability. An example of a network layer protocol is the Internet Protocol (xe2x80x9cIPxe2x80x9d). An example of such a transport protocol is the Transmission Control Protocol (TCP) contained within the transport layer 114. The term TCP/IP is commonly used to refer to the Internet architecture.
Data transmission over the network 100 therefore consists of generating data in, e.g., sending process 104 executing on the source station 110, passing that data to the application layer 112 and down through the layers of the protocol stack 125, where the data are sequentially formatted as a frame for delivery onto the network communications medium 180 as bits. Those frame bits are then transmitted over an established connection of medium 180 to the protocol stack 175 of the destination station 150 where they are passed up the layers 166, 160, 164, 162, 156, 154, and 152 of that stack 175 to a receiving process 174. Data flow is schematically illustrated by solid arrows.
Although actual data transmission occurs vertically through the stacks, each layer is programmed as though such transmission were horizontal. That is, each layer in the source station 110 is programmed to transmit data to its corresponding layer in the destination station 150, as schematically shown by dotted arrows. To achieve this effect, each layer of the protocol stack 125 in the source station 110 typically adds information (in the form of a header) to the data generated by the sending process as the data descends the stack.
For example, the network layer encapsulates data presented to it by the transport layer within a packet having a network layer header. The network layer header contains, among other information, source and destination (logical) network addresses needed to complete the data transfer. The data link layer, in turn, encapsulates the packet in a frame that includes a data link layer header containing information required to complete the data link functions, such as (physical) MAC addresses. At the destination station 150, these encapsulated headers are stripped off one-by-one as the frame propagates up the layers of the stack 175 until it arrives at the receiving process.
A xe2x80x9cclient/server networkxe2x80x9d is one conventional type of computer network architecture wherein data files stored or residing in one or more computer nodes (commonly termed xe2x80x9cserverxe2x80x9d computer nodes or xe2x80x9cserversxe2x80x9d) in the network are shared, using a distributed computer file system, by multiple processes (commonly termed xe2x80x9cclient processesxe2x80x9d) executing/residing in other computer nodes (commonly termed xe2x80x9cclientxe2x80x9d computer nodes) in the network. That is, data files and their characteristics stored or residing in the one or more server computer nodes may be accessed and modified via the distributed file system, by multiple client processes executing/residing in the client computer nodes.
The client/server network architecture offers advantages over other types of network architectures. For example, since in a client/server network, data files residing in a server computer node may be accessed by client processes residing in the client computer nodes, copies of these files need not also reside in the client nodes. This increases the amount of client computers"" resources that may be made available for other purposes, and eliminates the cost and time necessary to support and maintain separate copies of these files in the client computers.
A distributed computerized database system may be implemented using a client/server network architecture. In such a distributed database system, database management functions may be implemented by management processes executing on geographically distributed nodes; likewise, the database records may be distributed among the distributed nodes. For example, a distributed database may comprise multiple server nodes, and database management processes and records may be executed by and stored in, respectively, the server nodes. Respective client nodes may be associated with respective server nodes, and the respective client nodes may access the database records via interaction with the respective server nodes with which they are associated.
In conventional distributed database systems, complex mechanisms typically are used to determine the location of a database record requested by a client process. Disadvantageously, such complex mechanisms typically are implemented by complex software program code that is difficult to document, modify, and use with other database management-related programs.
Additionally, in conventional distributed databases, a further problem can arise when a particular data record (e.g., a master data record) is relocated from one server node to another server node (i.e., the master record stored in one server is no longer to be considered authoritative, and instead, another data record stored in a different server is to be considered authoritative). That is, the database must include a mechanism that ensures that the relocation of the master data record is made known to the processes (e.g., client node processes) that may desire to access the master data record (e.g., for purposes of replicating the record or data synchronization).
In accordance with the present invention, a computerized database system and method are provided that are able to overcome the aforesaid and other disadvantages and drawbacks of the prior art. More specifically, in one aspect of the present invention, a relatively simple mechanism is provided by which data records in the database may be identified and accessed. The mechanism uses specialized data structures, termed xe2x80x9cunique identification keys,xe2x80x9d that are associated with the data records. Each respective key specifies a respective location where a respective data record resides in a database. Each respective key specifies the respective location using a logical location value and a server identification value (e.g., the key may contain these values). The logical location value indicates a respective logical location where the respective data record, associated with the respective key, resides in the database. The server identification value indicates a respective physical server, assigned to the logical location, in which the respective record is stored. Each respective key may also specify a client identification number that identifies a client computer node, process, and/or user that was responsible for the creation of the respective data record, the time of creation of the respective data record, a key generation sequence number, and/or a key checksum value for use in determining whether errors exist in the respective key.
The server identification value may comprise a physical (e.g., MAC) address of a physical server in which the respective record resides. Also, in one embodiment of this aspect of the present invention, the database may include a plurality of geographically-distributed servers that are logically organized into server groups according to, inter alia respective functions performed by the respective server groups. In order to provide fault-tolerance, each of these server groups may include an active server and at least one backup server.
In another aspect of the present invention, a mechanism is provided that efficiently informs processes (e.g., client node processes) seeking to access or modify a database master record of relocating of that master data record. In one embodiment of this aspect of the present invention, a first version of a master record is stored in a first server node, and a second version of the master record is stored in a second server node, respectively. Each of the versions of the master record is associated with a respective unique identification key. The first server, in response to a master record relocation command modifies the first version of the master data record to include a reference to the respective identification key of the second version of the data record and changes the read/write status or attribute of the first record to read-only. In response to the master record transfer command, the second server node modifies the second version of the master record to include a reference to the respective key of the first version of the master record. The respective identification keys associated with the first and second versions of the master record each may be of the type used in the first aspect of the present invention.
Advantageously, the relatively simple data record identification and accessing mechanism, provided in the first aspect of the present invention, may be implemented by software program code that is more easily documented, modified, and used with other database management-related programs than the relatively complex data record identification and accessing mechanisms of the prior art. Also advantageously, in the second aspect of the present invention, a relatively simple and efficient mechanism is provided that ensures that a relocation of a master record in the database is made known to processes (e.g., client node processes) that may desire to access or modify the master record.
These and other features and advantages of the present invention will become apparent as the following Detailed Description proceeds and upon reference to the Drawings wherein like numerals depict like parts, and wherein: